<template>
  <a-modal
    title="查看"
    v-model="show"
    :maskClosable="false"
    :width="1050"
    placement="right"
    :closable="true"
    @cancel="onClose"
    :footer="null"
    :visiable="reconSceneMonitorInfoVisiable"
  >
    <a-form :form="form">
      <a-row>
        <a-col :md="12" :sm="24">
          <a-form-item label="对账场景标识"
                       v-bind="formItemLayout">
            <a-input v-decorator="['reconSceneId',{rules: [{ required: true, message: '必填' }]}]" :disabled="true"/>
          </a-form-item>
          <!--<a-form-item label="id" style="display: none">-->
          <!--<a-input type="hidden" name="id" v-decorator="['id']"/>-->
          <!--</a-form-item>-->
        </a-col>
        <a-col :md="12" :sm="24">
          <a-form-item label='批次日期'
                       v-bind="formItemLayout">
            <a-input v-decorator="['batchDate',{rules: [{ required: true, message: '必填' }]}]" :disabled="true"/>
          </a-form-item>
        </a-col>
      </a-row>
      <a-row>
        <a-col :md="12" :sm="24">
          <a-form-item label="检查任务数量"
                       v-bind="formItemLayout">
            <a-input v-decorator="['checkTaskNum']" :disabled="true"/>
          </a-form-item>
        </a-col>
        <a-col :md="12" :sm="24">
          <a-form-item label="创建时间"
                       v-bind="formItemLayout">
            <a-input v-decorator="['createTime']" :disabled="true"/>
          </a-form-item>
        </a-col>
      </a-row>
      <br>

    </a-form>
  </a-modal>
</template>


<script>
  import ACol from "ant-design-vue/lib/grid/Col";

  const formItemLayout = {
    labelCol: {span: 8},
    wrapperCol: {span: 16}
  }
  export default {
    components: {ACol},
    name: "ReconSceneMonitorInfo",
    props: {
      reconSceneMonitorInfoVisiable: {
        default: false
      }
    },
    data() {
      return {
        formItemLayout,
        form: this.$form.createForm(this),
        validateStatus: '',
        reconSceneMonitor: {
          instId: '',
          flag: '',
          reconSceneId: ''
        }
      }
    },
    methods: {
      reset() {
        this.loading = false
        this.form.resetFields()
      },
      onClose() {
        this.reset()
        this.$emit('close')
      },

      setReconSceneMonitorFields() {
        let values = this.form.getFieldsValue(['reconSceneId', 'batchDate',
          'checkTaskNum', 'createTime'])
        if (typeof values !== 'undefined') {
          Object.keys(values).forEach(_key => {
            this.reconSceneMonitor[_key] = values[_key]
          })
        }
      },

      setReconSceneMonitorFormValues({...reconSceneMonitor}) {
        let fields = ['reconSceneId', 'batchDate', 'checkTaskNum', 'createTime']
        Object.keys(reconSceneMonitor).forEach((key) => {
          if (fields.indexOf(key) !== -1) {
            this.form.getFieldDecorator(key)
            let obj = {}
            obj[key] = reconSceneMonitor[key]
            this.form.setFieldsValue(obj)
          }
        })
      }
    },
    computed: {
      show: {
        get: function () {
          return this.reconSceneMonitorInfoVisiable
        },
        set: function () {
        }
      }
    },
  }
</script>

<style scoped>

</style>
